<template>
  <div class="wrapper">
    <swiper :options="swiperOptions">
      <swiper-slide>
        <img class="swiper-img" src="../../../assets/pic/1.png" alt />
      </swiper-slide>
      <swiper-slide>
        <img class="swiper-img" src="../../../assets/pic/2.png" alt />
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  data() {
    return {
      swiperOptions: {
        // 所有的参数同 swiper 官方 api 参数一样
        // autoplay: {
        //   delay: 3000,
        //   disableOnInteraction: false
        // },
        // slidesPerView: 2,
        // centeredSlides: true,
        // centeredSlidesBounds: true,
        pagination: {
          el: ".swiper-pagination"
        },
        loop: true
        //   },
        //   swiperList: [
        //     {
        //       id: "0001",
        //       img: "../../../assets/pic/1.png"
        //     },
        //     {
        //       id: "0002",
        //       img: "../../../assets/pic/2.png"
        //     }
        //   ]
      }
    };
  }
};
</script>

<style lang="stylus" scoped>
.wrapper >>> .swiper-pagination-bullet-active
  background: #fff !important
.wrapper
  overflow: hidden
  width: 100%
  height: 0
  background: #eee
  padding-bottom: 28%
  .swiper-img
    width: 100%
</style>
